Colour image sensors often capture an image using an array of photodetector elements, each of which is sensitive to a particular colour or range of colours. For example an image sensor may have a rectangular array of detector elements, covered by a matching array of red, green and blue filters. One common pattern is called a Bayer pattern, which has twice as many green detector elements as red or blue elements.
The captured image data is a mosaic of red, green and blue elements represented by three corresponding data sets. When a colour image is captured by such a detector, it is necessary to interpolate each colour to fill in the captured image data to cover sensor locations where there was no sensor for that colour.
After interpolation, each detector element location, or pixel, has associated with it image data for each of the colours, following which the image data can be stored or processed according to the needs of a particular imaging application.
A simple method for generating the full colour image from image mosaic data is to use bilinear de-mosaicing. By this method, each of the data sets is processed independently.
New red values (at the positions of blue and green mosaic elements) are interpolated from the values of nearby red mosaic elements. New blue values (at the positions of red and green mosaic elements) are interpolated from the values of nearby blue mosaic elements. New green values (at the positions of red and blue mosaic elements) are interpolated from the values of nearby green mosaic elements.
This method suffers from two main problems. The first is that each of the interpolated data sets of the final de-mosaiced image contains no more detail than was available in the original mosaic elements of the same single colour. So the red and blue data sets derived from a Bayer mosaic only have one quarter of the maximum achievable resolution, and the green data set only has half of the maximum resolution. The second problem is that fine details in an image may give artificially strong or weak responses in a particular data set depending upon whether or not the details fell on or missed pixels of that colour. This gives rise to conspicuous colour aliasing.
A better method is described in U.S. Pat. No. 4,176,373. This describes a colour camera system in which a higher sample rate is used for the green data set than for the red and blue data sets. The two sample rates are analogous to the two rates of occurrence of green and red/blue filters in the Bayer pattern. The difference between the higher sample rate green channel and a down sampled version of the green channel (to match the sample rates of the red and blue channels) is then added to the red and blue channels. Thus, this method generates a high frequency luminance signal (approximated by the high frequencies of the green channel) and adds it to the low frequency chrominance (approximated by the low frequency red and blue channels). This method avoids additional colour aliasing and preserves detail from the green channel, adding the detail to the other two channels. It does not reduce colour aliasing in the original samples and does not exploit detail from the red and blue channels, which together would typically contribute half of the original resolution.
Another method that produces better results than the bilinear method is described in U.S. Pat. No. 4,642,678. When this method is applied to a Bayer mosaic, a complete green data set is first derived by bilinear interpolation from the mosaic data. Instead of interpolating the values of red and blue mosaic elements to fill in the other colour channels as for the bilinear method, the ratios of the values of the red or blue mosaic elements to the interpolated green data set values are calculated at those points. The ratios themselves are interpolated to relate the red and blue values to the green values across the whole array. The missing red and blue values are then derived from the interpolated ratios and the green data set values at each point of the array. This method generates red, green and blue values at each pixel location without contributing to colour aliasing effects, but it does nothing to reduce the colour aliasing that may have been present in the original mosaic data. Also, most of the image detail comes from the green data set, but due to interpolation this has only half of the desired maximum achievable resolution.
While these methods succeed in reducing the worst colour aliasing problems, some achromatic patterning resulting from the original aliasing problem may persist. This manifests as a zippering artefact close to chromatic edges in which checkerboard intensity variations are observed either to one, other or both sides of the edge.
Reduced zippering effects are obtained using a method described in U.S. 5,629,734. Here the green channel is processed first using an adaptive interpolation scheme that depends upon both horizontal and vertical intensity local gradient measures (computed from green pixels alone and/or complementary red or blue pixels also). The green signal is interpolated either along the row or column depending which direction has the smallest gradient (if the gradients are equal the average of the row and column interpolation is preferred). The interpolation can involve a correction term derived from the neighbouring red or blue pixels. This results in a complete green image that is free from local patterning whose content is then used to interpolate both the red and blue versions. Thus, image pixels for each colour value in the original mosaic image are directly interpolated to fill in missing pixel locations in such a way as to reduce zippering effects. The bidirectional adaptive techniques used do, however, not reduce colour aliasing and zippering artefacts as much as desired.
It is an object of the current invention to provide a convenient and economical apparatus and method for reconstructing a full colour image from image mosaic data, with reduced or eliminated mosaic artefacts such as zippering effects.